package edu.psu.collegerecommendationhelper;

import java.util.ArrayList;
import java.util.List;

import edu.psu.collegerecommendationtool.model.DemographicInfo;
import edu.psu.collegerecommendationtool.model.EducationInfo;
import edu.psu.collegerecommendationtool.model.PreferenceInfo;
import edu.psu.collegerecommendationtool.model.RecommendationListing;



public class RecommendationEngine implements GenerateRecommendations {


	private void buildInstanceFromUserData(ClassifierData data) {
		   
	}
	
	private void loadRegressionmodel() {
		   
	}
	
   private List<RecommendationListing> testUserAgainstRegressionmodel() {
	   List<RecommendationListing> results = new ArrayList<RecommendationListing>();
	   
	   RecommendationListing rl = new RecommendationListing();
	   RecommendationListing newRl = new RecommendationListing();
	   
	   rl.setAddress("State College, PA");
	   rl.setName("Penn State");
	   rl.setURL("www.psu.edu");
	   
	   newRl.getAddress();
	   newRl.getName();
	   newRl.getURL();
	   
	   results.add(newRl);
	   
	   return results;
   }


	public List<RecommendationListing> createListing(DemographicInfo demogrInfo,
			EducationInfo edu, PreferenceInfo pref) {
	
		System.out.println("createListing");
		
		UserToClassifierTranslator xlate = new UserToClassifierTranslator();
		ClassifierData data = xlate.translateData(demogrInfo, edu, pref);
		
		buildInstanceFromUserData(data);
		
		List<RecommendationListing> results = new ArrayList<RecommendationListing>();
		results = testUserAgainstRegressionmodel();
		
		System.out.println("sending results");
		
		return results;
	}
}
